The present invention relates to a method for expanding and/or contracting image information or data as well as an apparatus for carrying out the method.
The development of storage or memory devices whose capacity is more and more increased has been accompanied by the development of an increasing number of apparatuses which are capable of processing image data rather straightforwardly without resorting to a coding procedure, image data such as hand-written characters, graphic patterns, or the like. In this industrial field, a great demand exists for processing capability such as expansion or contraction of the image data at an increased speed.
The concept of expansion (or extension) and contraction (or compression) of image information or data (hereinafter referred to as image data) will now be briefly described.
It is assumed that image data X, which include a string of n picture elements or pixels X.sub.1, X.sub.2, . . . , X.sub.n arrayed one-dimensionally on lattice points, as shown in FIG. 1, is to be contacted to image data Z, which include m pixels Z.sub.1, Z.sub.2, . . . , Z.sub.m. In the case of the illustrated example, n=8 and m=5. Transformation (mapping) of the data X to Z can be realized in the manner illustrated in FIG. 2, in which 24a, 24b, . . . , 24h represent the lattice points which are located closest to a straight line 23 having a slope m/n=5/8. The individual pixels X.sub.1, X.sub.2, . . . , X.sub.n of the original image data 21 are transformed to the individual pixels Z.sub.1, Z.sub.2, . . . , Z.sub.5 of the output data 22 which are located on the left side to the corresponding lattice points 24a, 24b, . . . , 24h. It will be seen that the pixels X.sub.1 and X.sub.2 are, respectively, transformed into the output pixel Z.sub.1, while the original pixels X.sub.6 and X.sub.7 are, respectively, transformed into the output pixel Z.sub.4. For convenience' sake, the output pixel Z.sub.1 is assumed to be constituted by the original pixel X.sub.1, with Z.sub.4 being constituted by X.sub.6.
Expansion corresponds to the reverse of the contraction mentioned above. In other words, expansion may be considered as the reverse of contraction in which the original image data is replaced by the output data while the latter is replaced by the former. FIG. 3 illustrates the manner in which the original image data 25 of X.sub.1, . . . , X.sub.5 are expanded to the output data 26 of Z.sub.1, Z.sub.2, . . . Z.sub.8.
Heretofore, the expansion or contraction of image data has been arithmetically determined for each of the pixels, as mentioned below. Namely, in the case of the contraction illustrated in FIG. 2, the expression for transformation of a pixel X.sub.i of the original image data 21 into a pixel Z.sub.j of the output data 22 is, by way of example, given by EQU Z.sub.j .rarw.X.sub.i EQU j.rarw.[5/8i+0.5]
where [a] represents the maximum integer which does not exceed a.
In the case of expansion as illustrated in FIG. 3, the expression for transformation of X.sub.i into Z.sub.i is, for example, given by EQU Z.sub.j .rarw.X.sub.i EQU [5/8j+0.5].fwdarw.i
Since the expression for transformation has to be calculated for each of the pixels, the hitherto known method is disadvantageous in that high efficiency can not be attained in the transformation processing. In this connection, reference should be made to FIG. 4. When a two-dimensional image 41 composed of n.sub.y pixels in the vertical direction and n.sub.x pixels in the horizontal direction is to be transformed into a two-dimensional image 42 which is composed of m.sub.y pixels in the vertical direction and m.sub.x pixels in the horizontal direction, it will be seen that the manner in which the transformation of n.sub.x pixels to m.sub.x pixels in the horizontal or rowwise direction can be carried out is independent of the location of the pixel in the vertical or columnwise direction. The same holds true for the transformation of n.sub.y pixels to m.sub.y pixels in the vertical or columnwise direction. Accordingly, by storing the procedure for transformation determined upon transformation of the pixels on the first row or column, the succeeding transformation can be carried out by referring to the stored procedure without a necessity for any renewed calculation. However, in the prior art, the calculation was repeated anew at every transformation, so that much time was required in accomplishing the transformation.